﻿//电台菜单
document.getElementById("menucontain").onmouseover = function () {
    $("#rMenuCtn").css("display", "block");
}
document.getElementById("menucontain").onmouseout = function () {
    $("#rMenuCtn").css("display", "none");
}

//中间播放暂停按钮
$("#mscPlrMask").mouseover(function () {
    $("#playCtl").show();
})
$("#mscPlrMask").mouseout(function () {
    if (GetCookieByName("whetherpause") == "false")
    $("#playCtl").hide();
})

$("#corebtn").click(function () {
    //如果是在暂停状态
    if (GetCookieByName("whetherpause") == "true") {
        Play();
    }
    else {
        Pause();
    }
})

//播放
function Play()
{
    AddCookie("whetherpause", false, 0);
    document.getElementById("theRadio").play();
    $("#corebtn").removeClass("pause").addClass("playing");
    $("#rotateCD").removeClass("routed").addClass("routing");
}

//暂停
function Pause()
{
    AddCookie("whetherpause", true, 0);
    document.getElementById("theRadio").pause();
    $("#corebtn").removeClass("playing").addClass("pause");
    $("#rotateCD").removeClass("routing").addClass("routed");
}